package com.bawei.module_equipment.http

import com.bawei.lib_net.NetModules
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent

import retrofit2.Retrofit
import javax.inject.Qualifier
import javax.inject.Singleton

/**
 *作者：lxy
 *功能:
 *时间：2025/5/29
 */
@Module
@InstallIn(SingletonComponent::class)
object EquipmentNetModule {

    @Provides
    @Singleton
    @CommonEquipmentApi
    fun provideEquipmentApi(@NetModules.CommonRetrofit retrofit: Retrofit): EquipmentApi {
        return retrofit.create(EquipmentApi::class.java)
    }

    @Provides
    @Singleton
    @SignEquipmentApi
    fun provideSignEquipmentApi(@NetModules.SignRetrofit retrofit: Retrofit): EquipmentApi {
        return retrofit.create(EquipmentApi::class.java)
    }

    @Qualifier
    @Retention(AnnotationRetention.RUNTIME)
    annotation class CommonEquipmentApi

    @Qualifier
    @Retention(AnnotationRetention.RUNTIME)
    annotation class SignEquipmentApi
}